<?php 
/**
 * @author Eugenio Fage
 * http://eugeniofage.wordpress.com/
 * http://code.google.com/p/monky/
 * 
 */

$this->Html->script('theme/link-vote.js',false); ?>
<div class="span-16 colborder whitebox" style="padding:0 14px">
  <h2><?php __('Shake links');?></h2>
  <div id="links-summary" style="width:auto;">
<? if(empty($links)){ 
	 echo '<p>'.__('Sorry but there are no links here right now. ',true).$this->Html->link(__('So, why dont you submit something?',true),array('controller'=>'links','action'=>'add')).'</p>';
  }else {
	foreach ($links as $link) echo $this->element('link',array('link'=>$link));
  } ?>
  </div>
  <div style="clear:both"></div>
<?php
if($numbers=$paginator->numbers()){
	echo $paginator->prev('« Previous ', null, null, array('class' => 'disabled')).
 	$numbers.
 	$paginator->next(' Next »', null, null, array('class' => 'disabled'));
}  	?> 
</div>

<?php 
$this->Js->get("a[rel$='external']")->event('click','
			window.open( $(this).attr("href") );
			return false;
		');
//  this.target = "_blank";
?>

<div class="span-7 last">
  <div class="actions small-cats"><?=$this->element('categories') ?></div>
  <div style="clear:both"></div>
  <?=$this->element('boxes',array('boxes'=>array('popular','votedsites','votedcomments','categories','tags'))); ?>
</div>
<?=$this->element('report-link') ?>
<script type="text/javascript">
  DO_VOTE_URL='<?=Router::url(array('controller'=>'links','action'=>'doVote')) ?>';
</script>